var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    console.log(options)

    var id = options.id
    var flag = options.flag
    var openid = wx.getStorageSync("openid")

    var issuerId = options.issuerId
    var receptorId = options.receptorId
    var drawerid = options.drawerId
    var date = options.dateStr

    var that = this

    that.setData({
      flag : flag
    })

    if (flag == "receptor"){
      wx.request({
        url: app.globalData.URL + '/app/team/awardDetail?id=' + id + '&openid=' + openid + '&flag=' + flag + '&issuerId=' + '&receptorId=' + receptorId + '&drawerid=' + drawerid + '&dateStr=' + date,
        success: function (res) {
          console.log("/team/awardDetail", res)
          
          that.setData({
            list: res.data.obj
          })
          
        }
      })
    }else{
      wx.request({
        url: app.globalData.URL + '/app/team/awardDetail?id=' + id + '&openid=' + openid + '&flag=' + flag + '&issuerId=' + issuerId + '&receptorId=' + '&drawerid=' + drawerid + '&dateStr=' + date,
        success: function (res) {
          console.log("/team/awardDetail", res)
          
          that.setData({
            list: res.data.obj
          })
          
        }
      })
    }
     
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  makePhone:function(){
    var that = this
    wx.makePhoneCall({
      phoneNumber: that.data.phone,
    })
  },

  
})